package com.kailong.service;

import com.kailong.dto.PageResultDTO;
import com.kailong.dto.UserSearchDTO;

import com.kailong.entity.auth.AuthUserEntity;
import com.kailong.entity.auth.CaptchaEntity;
import com.kailong.entity.auth.JwtUserEntity;
import com.kailong.entity.auth.TokenEntity;
import com.kailong.entity.sys.UserEntity;

import javax.servlet.http.HttpServletRequest;


/**
 * created by kailong on 2025/8/4
 */
public interface UserService {
    /**
     * 根据id查询用户
     * @param id
     * @return 影响行数
     */
    public UserEntity fingById(Long id);
    /**
     * 新增用户
     * @param userEntity
     * @return 影响行数
     */
    public void insert(UserEntity userEntity);
    /**
     * 修改用户
     * @param userEntity
     * @return 影响行数
     */
    public int update(UserEntity userEntity);
    /**
     * 删除用户
     * @param id
     * @return 影响行数
     */
    public int delete(Long id);
    /**
     * 根据条件查询用户
     * @param searchDTO
     * @return
     */
    PageResultDTO<UserEntity> searchUsers(UserSearchDTO searchDTO);
    /**

     * 用户登录
     * @param authUserEntity 用户录入信息
     * @return
     */
    public TokenEntity login(AuthUserEntity authUserEntity);
    /**
     * 用户退出登录
     * @param request
     */
    public void logout(HttpServletRequest request);
    /*
    * 获取验证码
     */
    public CaptchaEntity getCode();
    /**
     * 获取用户信息
     * @return
     */
    public JwtUserEntity getUserInfo();
}
